package com.ruicar.afs.cloud.archive.feign;

import com.alibaba.fastjson.JSONObject;
import com.ruicar.afs.cloud.common.core.feign.AfsFeignFormSupport;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * @description: 获取TOKEN接口
 * @author: yaorui.zhang
 * @date: 2020年9月21日 10:02:04
 */
@FeignClient(name = "token", url = "${com.greatwall.systems.token-system.url}", configuration = AfsFeignFormSupport.class)
public interface GetTokenFeign {

    /**
     * 获取token信息
     *
     * @param data
     * @return
     */
    @ApiOperation("获取token信息")
    @PostMapping(value = "/connect/token", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    JSONObject getTokenInfo(@RequestBody Map<String, ?> data);

}
